package com.concurrent.syn;

public class DisappearRequest1 implements Runnable{
    static DisappearRequest1 disappearRequest1= new DisappearRequest1();
    static int count=0;
    public static  void main(String[] args) throws InterruptedException {
        Thread thread1 = new Thread(disappearRequest1);
        Thread thread2 = new Thread(disappearRequest1);
        thread1.start();
        thread2.start();
        thread1.join();
        thread2.join();
        System.out.println(count);
    }

    @Override
    public void run() {
        synchronized (this){
            for(int i =0;i<10000;i++){
                count++;
            }
        }
    }
}
